x86/hyperv: setup hypercall page
authorWei Liu <liuwe@microsoft.com>
Wed, 15 Jan 2020 16:40:49 +0000 (16:40 +0000)
committerWei Liu <liuwe@microsoft.com>
Wed, 5 Feb 2020 15:55:02 +0000 (15:55 +0000)
commit620fc734f854f3ee9826bc7ad28d989fec06ba09
treecdcba8098a35cc283ef9d69ca36b0f2da71e251b
parent39ee69e4d677db5974095b3f68f59024299ac173
x86/hyperv: setup hypercall page

Hyper-V uses a technique called overlay page for its hypercall page. It
will insert a backing page to the guest when the hypercall functionality
is enabled. That means we can use a page that is not backed by real
memory for hypercall page.

To avoid shattering L0 superpages and treading on any MMIO areas
residing in low addresses, use the top-most addressable page for that
purpose. Adjust e820 map accordingly.

We also need to register Xen's guest OS ID to Hyper-V. Use 0x3 as the
vendor ID. Fix the comment in hyperv-tlfs.h while at it.

Signed-off-by: Wei Liu <liuwe@microsoft.com>
Reviewed-by: Roger Pau Monné <roger.pau@citrix.com>
Acked-by: Paul Durrant <pdurrant@amazon.com>
xen/arch/x86/guest/hyperv/hyperv.c
xen/include/asm-x86/guest/hyperv-tlfs.h
xen/include/asm-x86/guest/hyperv.h